extends "../zhenming-1/zhenming-1.gd"


func _extInit():
	._extInit()
	lv = 2             #等级的设置
	addSkill("每对同一个目标炮击3次，额外造成[炮击*2+目标血上限*0.2]的技能伤害", "烈光武勋")
var p2 = 1
var num = 0
var cha = null
func _onAtkChara(atkInfo):
	._onAtkChara(atkInfo)
	if atkInfo.atkType == sys.AtkType.GUN:
		if cha != atkInfo.hitCha:
			cha = atkInfo.hitCha
			num = 0
		num += 1
		if num == 3:
			var dmg = att.atk*2 + atkInfo.hitCha.att.maxHp*0.2
			if atkInfo.hitCha.type == sys.CharaClass.BOSS:
				dmg *= 0.5
			azurHurtChara(atkInfo.hitCha, dmg, sys.HurtType.WEAPON, Chara.AtkType.SKILL, "烈光武勋", false, p2)
			num = 0

func _onBattleStart():
	._onBattleStart()
	num = 0
	cha = null